let env = {
    dev: {
        mysql: {
            logging: true, // 是否打印数据库查询日志
            dbname: 'wepan',
            username: 'root',
            password: '123456',
            host: 'localhost',
            port: 33060,
            baseUrl: 'http://localhost:3002'
        },
        redis: {
            port: 6379,
            host: 'localhost',
            baseUrl: 'http://localhost:3002'
        }
    },
    online: {
        mysql: {
            logging: false, // 是否打印数据库查询日志
            dbname: 'wepan',
            username: 'root',
            password: '123456',
            host: 'localhost',
            port: 33060,
            baseUrl: 'http://localhost:3002'
        },
        redis: {
            port: 6379,
            host: 'localhost',
            baseUrl: 'http://localhost:3002'
        }
    }
};

let cfg = null;

if (process.env.NODE_ENV == 'develop') {
    cfg = env.dev;
    console.log('测试环境配置');
} else {
    cfg = env.online; // 默认为线上环境，简化线上服务器的配置
    console.log('线上环境配置');
}

module.exports = cfg;